<!DOCTYPE html>
<html lang="en-US">
<head>
	<meta charset="utf-8">
	<title>"清白泉"廉洁文化宣教网</title>
	<link rel="icon" href="./img/favicon.ico"/>
	<link rel="stylesheet" type="text/css" href="./css/index.css">
	<script type="text/javascript" src="./js/jquery-3.3.1.min.js"></script>
	<!--[if lte IE 8]>
		<link rel="stylesheet" type="text/css" href="./css/ie8.css">
		<script type="text/javascript" src="https://code.jquery.com/jquery-1.9.0.min.js"></script>
	<![endif]-->
</head>
<body>
<!-- 横幅 -->
	<img src="./img/header-top.png" style="width: 100%;">
	<!-- <div class="banner-container mountain-top ie8-back">
	[if lte IE 8]>
		<img src="./img/back-mountainTop.png" class="ie8-backImg">
	<![endif]
		<div class="border-cell border-top"></div>
		<div class="banner-inner able-center">
			<div class="banner-image">
				<img src="./img/back-wall.png">
			</div>
			<div class="banner-title">
				<img src="./img/title.png">
			</div>
		</div>
		<div class="border-cell border-bottom"></div>
	</div> -->
	<!-- 主体内容 -->
	<div class="main-container mountain ie8-back">
	<!--[if lte IE 8]>
		<img src="./img/back-mountain.png" class="ie8-backImg">
	<![endif]-->
		<div class="able-center opacity-back">
			<!-- 卷首语 -->
			<div class="jsy-wrap paint ie8-back">
			<!--[if lte IE 8]>
				<img src="./img/back-panit.png" class="ie8-backImg">
			<![endif]-->
			<div class="jsy-inner">
				<div class="jsy-left">
					<img src="./img/tip-jsy.png">
				</div>
				<div class="jsy-right">
					<p class="jsy-parag">
						绍兴，与水结缘2500余年。作为首批历史文化名城，绍兴的文化基因中不可或缺的就是水文化。绍兴的廉政文化建设自然也离不开水文化的清润。“清白泉”位于绍兴市区府山公园南麓岩壁。此泉由北宋著名政治家范仲淹在宝元二年（公元1039年）任越州支付时发现，因“爱其清白儿有德义，为管师之规”（取自范仲淹《清白堂记》），遂取名为“清白泉”。
					</p>
				</div>
			</div>
			</div>
			<!-- 板块信息 -->
			<!-- 板块信息 -->
			<div class="menu">
				<!-- 名士家风 -->
				<div class="palete-wrap single">
					<div class="plate-container">
						<div class="plate-header">
							<h3 class="plate-title" id="title">
								<img>
								<!-- <span class="plate-title-extra"></span> -->
								<a class="plate-link-more" href="./index.html">返回首页</a>
							</h3>
						</div>
						<div class="plate-inner">
							<div class="plate-left">
								<ol class="plate-list" id="subtilte">
								
								</ol>
							</div>
							<div class="plate-content">
								<ol class="plate-list" id="paraghContent"></ol>
								<ol class="plate-videolist" id="videoContent"></ol>
								<ol class="plate-buttons" id="ButtonContent"></ol>
								<ol class="plate-imglist" id="ImgContent"></ol>
								
								<div class="turn" style="clear: both;">
									<a class="turn-pre" onclick="getPageNext(-1)">上一页</a>
									<span class="turn-number">

									</span>
									<a class="turn-next" onclick="getPageNext(1)">下一页</a>到第
									<a><input type="text" name="page" id="pageNumValue" max></a>页
									<a onclick="getPageNumTo()">跳转</a>
									共<span class="turn-total">&nbsp;&nbsp;</span>页
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
	</div>
	</div>
<script type="text/javascript" src="./js/lianjie.js"></script>
<script type="text/javascript">
	var stable = [
		{
			name:"名士家风",
			img:"msjf.png",
			dept:"绍兴县党支部、网络党支部",
			childs:[
				{
					name:"清白泉·廉洁家风大讲堂",
					id: "no1"
				},
				{
					name:"清白泉·名士家风主题演讲",
					id: "no2"
				},
				{
					name:"清白泉·清风故事会",
					id: "no3"
				}
			]
		},
		{
			name:"清风悦读",
			img:"qfyd.png",
			dept:"上虞党支部",
			childs:[
				{
					name:"党规党纪",
					id: "no5"
				},
				{
					name:"法规释义",
					id: "no6"
				},
				{
					name:"业务解答",
					id: "no7"
				}
			]
		},
		{
			name:"翰墨清韵",
			img:"hmqy.png",
			dept:"诸暨党支部",
			childs:[
				{
					name:"获奖作品",
					id: "no4",
					menu:"hjzp"
				},
				{
					name:"宣传展览",
					id: "no4",
					menu:"xczl"
				},
				{
					name:"作品展览",
					id: "no4",
					menu: "zpzs"
				}
			]
		},
		{
			name:"清风纪语",
			img:"qfjy.png",
			dept:"嵊州党支部、越城党支部",
			childs:[
				{
					name:"我观廉洁",
					id: "no8",
					menu:"wglj"
				},
				{
					name:"我树新风",
					id: "no16",
					menu:"wsxf"
				}
				
			]
		},
		{
			name:"新风宣言",
			img:"xfxy.png",
			dept:"嵊州党支部、越城党支部",
			childs:[
				{
					name:"新风宣言",
					id: "no9"
				}
			]
		},
		{
			name:"清风学堂",
			img:"qfxt.png",
			dept:"政企党支部",
			childs:[
				/*{
					name:"现场零距离",
					id: "no10"
				},*/
				{
					name:"清风之旅",
					id: "no11"
				},
				{
					name:"举案说纪",
					id: "no12"
				},
				{
					name:"题目测试",
					id: "no15"
				}
			]
		},
		{
			name:"倡廉前线",
			img:"clqx.png",
			dept:"新昌党支部",
			childs:[
				{
					name:"倡廉前线",
					id: "no13"
				}/*,
				{
					name:"选廉树廉",
					id: "no14"
				}*/
			]
		}
	];
	var pageMsg;
	var activeNav;
	var pageNo;
	var pageSize;
	$(function(){
		initSubTitle(getArgsFromPre("status"));
	});
	initSubTitle = function(index){
		pageMsg = stable[index];
		/*标头文字及样式*/
		$("#title>img").attr("src","./img/"+pageMsg.img);
		$("#title .plate-title-extra").text(pageMsg.dept);
		var title = getArgsFromPre("subtilte");
		var html = "";
		for(var i= 0;i<pageMsg.childs.length;i++){
			if(pageMsg.childs[i].id == title){
				activeNav = pageMsg.childs[i];
				html+="<li class='active' active='"+i+"'><a>"+pageMsg.childs[i].name+"</a></li>";
			}else{
				html+="<li  active='"+i+"'><a>"+pageMsg.childs[i].name+"</a></li>";
			}
		}
		$("#subtilte").html(html);
		/*点击更多情景*/
		if(title == ""){
			$("#subtilte li:first").attr("class","active");
			activeNav = pageMsg.childs[0];
		}
		/*添加事件*/
		$("#subtilte li").each(function(){
			$(this).click(function(){
				$("#subtilte li").attr("class","");
				$(this).attr("class","active");
				activeNav = pageMsg.childs[$(this).attr("active")];
				if(activeNav.id == "no4"){
					pageSize=999;
				}else if(activeNav.id == "no9"){
					pageSize=9;
				}else{
					pageSize = 10;
				}
				getPageTurnList(1);
			});
		});
		/*获取数据*/
		if(activeNav.id == "no4"){
			pageSize=999;
		}else if(activeNav.id == "no9"){
			pageSize=9;
		}else{
			pageSize = 10;
		}
		getPageTurnList(1);


	}
	/*数据列表分流
	* 
	*/
	renderDataList = function(id,data){
		data = eval('('+data+')');
		list = data.infos;
		var html = "";
		if(typeof (list) == "string"&&list!=""){
			list = eval('('+list+')');
		}
		if(list.length == 0){
			html+="<li class='clear-border blank-tip'><p>暂无信息</p></li>";
			$("#"+id).html(html);
			$(".turn").hide();
			return false;
		}
		if(activeNav.menu=="hjzp"){
			html+="<li class='metail-title'><h4><img src='./img/cloudl.png'>"+list[0].type+"<img src='./img/cloudr.png'></h4></li>";
		}
		for(var i = 0;i<list.length;i++){
			if(id == "paraghContent"){
				html+="<li title='"+list[i].title+"'  name='"+list[i].method+"'><a id='"+list[i].id+"'>"+list[i].title+"</a><span class='time-right'>"+list[i].createdate+"</span></li>";
			}else if(id =="ImgContent"){
				if(activeNav.menu=="xczl"){
					html+="<li class='img-inner-alone' title='"+list[i].title+"'><div><a class='img-wrap' href='"+list[i].url+"' target='_blank' title='"+list[i].title+"'><img src='"+list[i].url+"'></a></div><h5>"+list[i].title+"</h5></li>";
				}else if (activeNav.menu!="hjzp"){
					html+="<li title='"+list[i].title+"'><div class='paintY ie8-back'><!--[if lte IE 8]><img src='./img/back-panitY.png' class='ie8-backImg'><![endif]--><a class='img-wrap' href='"+list[i].url+"' target='_blank' title='"+list[i].title+"'><img src='"+list[i].url+"'></a></div><h5>"+list[i].title+"</h5></li>";
				}else{
					html+="<li class='img-sweet' title='"+list[i].title+"'><div><a class='img-wrap' href='"+list[i].url+"' target='_blank' title='"+list[i].title+"'><img src='"+list[i].url+"'></a></div><h5>【"+list[i].type+"】</h5><p>"+list[i].title+"</p></li>";
				}
				
			}else{
				 html+="<li class='video-player";
				 if(i!=0&&i%3 == 0){
				 	html+=" clear";
				 }
				 html+="' title='"+list[i].title+"'><div>";
				if(getIEVer() < 12) {//ie下
			       html+="<embed src='"+list[i].url+"' style='width:100%' autostart=false></embed>";
			    } else {//其他浏览器
			    	 html+="<video src='"+list[i].url+"' style='width:100%' controls='controls'></video>";
			    }
				html+="</div><a id='"+list[i].id+"'><h5>"+list[i].title+"</h5><p>"+list[i].creater+"&nbsp;&nbsp"+list[i].createdate+"</p></a></li>";
			}
		}
		if(activeNav.menu!="hjzp"){
			$("#"+id).html(html);
			html="";
			if(id == "paraghContent"|| id=="videoContent"){
				/*点击事件*/
				$("#"+id+" li").each(function(){
					if($(this).children("p").length == 0){
						$(this).children("a").click(function(){
						linkToDetail(getArgsFromPre("status"),activeNav.id,$(this).attr("id"));
					});
					}
					
				});
			}
			/*分页初始化*/
			$(".turn").show();
			var length = Math.ceil(data.total/pageSize);
			$(".turn-total").text(length);
			for(var i=0;i<length;i++){
				if(i+1 == pageNo){
					html+="<a class='active'>"+(i+1)+"</a>";
				}
				else{
					html+="<a>"+(i+1)+"</a>";
				}
			}
			$(".turn-number").html(html);
			/*上一页下一页是否出现*/
			if(pageNo > 1){
				$(".turn-pre").show();
			}else{
				$(".turn-pre").hide();
			}
			if(pageNo < length){
				$(".turn-next").show();
			}else{
				$(".turn-next").hide();
			}
			/*翻页的点击事件*/
			$(".turn-number>a").each(function(){
				$(this).click(function(){
					getPageTurnList(parseInt($(this).text()));
				});
			});
			if(length == 1){
				$(".turn").hide();
			}
		}else{
			$(".turn").hide();
			html+="<li class='split-line'></li>";
			$("#"+id).append(html);
			if(list[0].type == "金奖作品"){
				getDataImgLevelList("ImgContent",activeNav.id,activeNav.menu,"yin");
			}
			if(list[0].type == "银奖作品"){
				getDataImgLevelList("ImgContent",activeNav.id,activeNav.menu,"tong");
			}
		}
	}	
	/*翻页功能
	* @param {stirng} pageNo
	**/
	getPageTurnList = function(num){
		pageNo = num;
		$("#paraghContent").html("");
		$("#ImgContent").html("");
		$("#videoContent").html("");
		$("#ButtonContent").html("");
		if(activeNav.id == "no4"){
			if(activeNav.menu!="hjzp"){
				getDataImgsList("ImgContent",activeNav.id,activeNav.menu,pageNo,pageSize);
			}else{
				$("#ImgContent").html("");
				getDataImgLevelList("ImgContent",activeNav.id,activeNav.menu,"jin");
			}
		}
		else if(activeNav.id == "no9"){
			getDataList("videoContent",activeNav.id,pageNo,pageSize);
		}else if (activeNav.id == "no15") {
			$("#ImgContent").html("<li><div class='btn-demo ceshiback ie8-back'><!--[if lte IE 8]><img src='./img/beijing.jpg' class='ie8-backImg'><![endif]-->"+
				"<h5>顺序测试</h5><p>暂未开放</p></div></li><li><div class='btn-demo ceshiback ie8-back'><!--[if lte IE 8]><img src='./img/beijing.jpg' class='ie8-backImg'><![endif]--><h5>任前测试</h5><p>暂未开放</p></div></li>");
			$(".turn").hide();
		}
		else{
			getDataList("paraghContent",activeNav.id,pageNo,pageSize);
		}
	}
	/*下一页/上一页*/
	getPageNext = function(num){
		getPageTurnList(pageNo+num);
	}
	/*跳页*/
	getPageNumTo = function(){
		var number = $("#pageNumValue").val();
		if(number==""){
			alert("请输入页码！");
			$("#pageNumValue").focus();
		}
		number = parseInt(number);
		if(number>0&&number<=parseInt($(".turn-total").text())){
			getPageTurnList(number);
		}
		else{
			alert("请输入正确的页码！");
			$("#pageNumValue").focus();
		}
		
	}
</script>
</body>
</html>